<% content_for :head do %>
  <%= javascript_include_tag :ui %>

  <script type="text/javascript">
    $(document).ready(function(){
      $(".accordion").accordion({
        collapsible: true,
        autoHeight: false,
        active: false
      });
    });
  </script>

  <style type="text/css">
    .accordion {
      width: 800px;
    }
    .headline {
      border-bottom: 1px solid black;
    }
    .headline a {
      padding-left: 32px;
      text-decoration: none;
      color: black;
    }
    .headline .ui-icon {
      position: absolute;
      margin-top: 6px;
      width: 23px;
      height: 20px;
      background: transparent url('/assets/admin/shared/accordion_arrow.png') no-repeat;
    }
    .ui-state-active .ui-icon {
      background-position: -21px 0px;
    }
  </style>
<% end %>

  <%= form_for [:admin, @setting], :url => admin_setting_path, :validate => true do |f| %>

    <%= render "shared/error_messages", :target => @setting %>

    <h2>Obchod</h2>

    <div class="accordion">
       <%= render "company_info", :f => f %>
    </div>

    <h2>Administrace</h2>

    <div class="accordion">
      <%= render "photos", :f => f %>

      <%= render "paginates_per", :f => f %>
    </div>
  <% end %>